<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="functions.asp" --> 
<%
set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = cn
Recordset1.Source = "SELECT *  FROM dbo.EXIAUTHORITY  ORDER BY LEVELNUM, GROUPDESC"
'Recordset1.CursorType = 0
'Recordset1.CursorLocation = 2
'Recordset1.LockType = 3
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = -1
Dim Repeat1__index
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<SCRIPT Language="JavaScript">

function DocLoad(){

}
</SCRIPT>
<!-- #include file="pagetop.asp" -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#93bee2">
  <tr> 
    <td width="4%">&nbsp;</td>
    <td width="1%">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td width="4%">&nbsp;</td>
    <td width="1%">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td width="4%" height="22">&nbsp;</td>
    <td width="1%" bgcolor="#FFFFFF" height="22"><img src="images/curv_data.gif" width="21" height="21"></td>
    <td bgcolor="#FFFFFF" height="22">&nbsp;</td>
  </tr>
  <tr> 
    <td width="4%">&nbsp;</td>
    <td width="1%" bgcolor="#FFFFFF">&nbsp;</td>
    <td bgcolor="#FFFFFF"> 
      <table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#999999">
        <tr bgcolor="#D1DDEF"> 
          <td width="3%" height="18">&nbsp;</td>
          <td width="15%" height="18"> 
            <div align="center"><b>Level</b></div>
          </td>
          <td width="8%" height="18"> 
            <div align="center"><b>Group</b></div>
          </td>
          <td width="7%" height="18"> 
            <div align="center"><b>Initials</b></div>
          </td>
          <td width="18%" height="18"> 
            <div align="center"><b>Name</b></div>
          </td>
          <td width="12%" height="18"> 
            <div align="center"><b>Department</b></div>
          </td>
          <td height="18"> 
            <div align="center"><b>Main Authority</b></div>
          </td>
          <td width="17%" height="18">
            <div align="center"><b>Delegate To</b></div>
          </td>
        </tr>
        <% dim tmpLevel
		   tmpLevel = ""
		   dim tmpGroup
		   tmpGroup = "0" 
		%>
        <% 
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF)) 
%>
        <% if (tmpLevel <> Recordset1.Fields.Item("LEVELDESC").Value) or (tmpGroup<>Recordset1.Fields.Item("GROUPDESC").Value) then %>
        <tr bgcolor="#eeeeee"> 
          <td height="1" width="3%">&nbsp;</td>
          <td height="1" colspan=7>&nbsp;</td>
        </tr>
        <% end if %>
        <tr bgcolor="#FFFFFF"> 
          <td bgcolor="#FFFFFF" width="3%">&nbsp;</td>
          <td bgcolor="#FFFFFF" width="15%"><b> 
            <% if (tmpLevel <> Recordset1.Fields.Item("LEVELDESC").Value) or (tmpGroup<>Recordset1.Fields.Item("GROUPDESC").Value) then %>
            <%=(Recordset1.Fields.Item("LEVELDESC").Value)%> 
            <% end if %>
            </b></td>
          <td width="8%"> 
            <div align="center"><b> 
              <% if (tmpGroup<>Recordset1.Fields.Item("GROUPDESC").Value) then %>
              Group&nbsp;<%=(Recordset1.Fields.Item("GROUPDESC").Value)%> 
              <% end if %>
              </b></div>
          </td>
          <td width="7%"> 
            <div align="center"><%=(Recordset1.Fields.Item("INITIALS").Value)%></div>
          </td>
          <td width="18%"><a href="javascript:openpopup3('Authority_frm.asp?seqnum=<%=(Recordset1.Fields.Item("SEQNUM").Value)%>')"><%=(Recordset1.Fields.Item("MANAGERNAME").Value)%></a></td>
          <td width="12%"> 
            <div align="left"><%=(Recordset1.Fields.Item("DEPARTMENT").Value)%></div>
          </td>
          <td><a href="javascript:openpopup3('Authority_frm.asp?seqnum=<%=(Recordset1.Fields.Item("SEQNUM").Value)%>')"><%=(Recordset1.Fields.Item("AUTHDESCR").Value)%></a></td>
          <td width="17%"><%=(Recordset1.Fields.Item("DOANAME").Value)%></td>
        </tr>
        <% 
		tmpLevel = Recordset1.Fields.Item("LEVELDESC").Value
		tmpGroup = Recordset1.Fields.Item("GROUPDESC").Value
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  Recordset1.MoveNext()
Wend
%>
        <tr bgcolor="#FFFFFF"> 
          <td width="3%" height="30">&nbsp;</td>
          <td width="15%" height="30" valign="middle"> 
            <input type="button" name="Button" value=" Add Entry " class="sbttn" onClick="openpopup3('Authority_frm.asp?seqnum=0')">
          </td>
          <td width="8%" height="30"> 
            <div align="center"></div>
          </td>
          <td width="7%" height="30"> 
            <div align="center"></div>
          </td>
          <td width="18%" height="30">&nbsp;</td>
          <td height="30" width="12%">&nbsp;</td>
          <td height="30">&nbsp;</td>
          <td height="30" width="17%">&nbsp;</td>
        </tr>
      </table>
    </td>
  </tr>
  <tr> 
    <td width="4%">&nbsp;</td>
    <td width="1%" bgcolor="#FFFFFF">&nbsp;</td>
    <td bgcolor="#FFFFFF">&nbsp;</td>
  </tr>
</table>
</body>
</html>
<%
Recordset1.Close()
%>
